﻿using Service4u2.Json;

namespace MoAds.Example
{
    public class CustomAdFetchResponse
    {
        public string ImageUrl { get; set; }
        public string AdText { get; set; }
        public string ClickUrl { get; set; }
    }

    public class CustomAdService : BaseJsonService<CustomAdFetchResponse>
    {
        private const string fetchUrl = "http://localhost:53339/Ad/Fetch?pubId={0}&clientId={1}";

        public void FetchAdAsync(string publisherId, string clientId = "")
        {
            StartServiceCall(string.Format(fetchUrl, publisherId, clientId));
        }
    }
}
